package com.data.model;

/**
 * ConfigRoomId entity. @author MyEclipse Persistence Tools
 */

public class ConfigRoomId implements java.io.Serializable {

	// Fields

	private Integer roomId;
	private Integer gameId;

	// Constructors

	/** default constructor */
	public ConfigRoomId() {
	}

	/** full constructor */
	public ConfigRoomId(Integer roomId, Integer gameId) {
		this.roomId = roomId;
		this.gameId = gameId;
	}

	// Property accessors

	public Integer getRoomId() {
		return this.roomId;
	}

	public void setRoomId(Integer roomId) {
		this.roomId = roomId;
	}

	public Integer getGameId() {
		return this.gameId;
	}

	public void setGameId(Integer gameId) {
		this.gameId = gameId;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof ConfigRoomId))
			return false;
		ConfigRoomId castOther = (ConfigRoomId) other;

		return ((this.getRoomId() == castOther.getRoomId()) || (this
				.getRoomId() != null && castOther.getRoomId() != null && this
				.getRoomId().equals(castOther.getRoomId())))
				&& ((this.getGameId() == castOther.getGameId()) || (this
						.getGameId() != null && castOther.getGameId() != null && this
						.getGameId().equals(castOther.getGameId())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getRoomId() == null ? 0 : this.getRoomId().hashCode());
		result = 37 * result
				+ (getGameId() == null ? 0 : this.getGameId().hashCode());
		return result;
	}

}